from sqlalchemy.orm import declared_attr
from sqlalchemy import Column, BigInteger
import time

class TimestampMixin:
    @declared_attr
    def created_at(cls): return Column(BigInteger, default=lambda: int(time.time()))
    @declared_attr
    def updated_at(cls): return Column(BigInteger, default=lambda: int(time.time()))
